               Program AMMH; //By Unknown Users Credit to Unknows Source, i used some of his procedures
        var www,y1,x1,hitcount,z,w,HitCountReset,Facing,TargetDir,people,monster,
        hpcolor,x,y,monstercount,monsters,Ice_cold,Icyhawt,exp,clicker,pty,monsterM:integer;
        //Scroll down on the function list and click
        //on setting to set how many monsters to kill
        //per relog! and refer to the bottom for hotkeys
        const
        user='efron';
        pass='ilovemom';
        share=0; //Leave off it doesnt work atm
        heal=0; //1=on, 0=off
        pots=1; //1 is on 0 off
        mager=1;
        changetimer=0;


        Procedure ReadString(str: String);{by rena: START}
        var
        i,strLength :Integer;
        goer: Boolean;

        begin
        i:=1
        strLength:=Length(str)
        goer:=False
        while(i<strLength+1) do
        begin
        if(GetKeyCode(StrGet(str,i))=191)then
        begin
        KeyDown(16)
        goer:=True
        i:=i+1
        end;
        KeyDown(GetKeyCode(StrGet(str,i)))
        wait(50)
        KeyUp(GetKeyCode(StrGet(str,i)))
        wait(100)
        KeyUp(GetKeyCode(StrGet(str,i)))
        wait(50)
        i:=i+1
        if(goer=True)then
        begin
        KeyUp(16)
        wait(600)
        end;
        end;
        wait(300)
        end;{by rena: END}

        procedure changetime;
        begin
        if(changetimer=1) then begin
        wait(1000)
        clickmouse(647, 390, true)
        wait(10)
        clickmouse(647, 390, true)
        wait(10)
        keydown(51)
        wait(50)
        keyup(51)
        wait(10)
        keydown(58)
        wait(50)
        keyup(58)
        wait(10)
        clickmouse(700, 475, true)
        end
        end;


        Procedure relog;
        var char:integer;
        begin //
        char:=1
        clickmouse(600, 50, true);wait(500);
        findcolorspiral2(x, y, 10079232, 10, 10, 640, 350);clickmouse(x, y, true)
        wait(1000)
        repeat
        clickmouse(400, 224, true);wait(700);clickmouse(400, 324, true);wait(700)
        until (findcolorspiral (x, y, 255,17, 359, 54, 496)=false)
        repeat clickmouse(115, 375, true);wait(500)
        until ((findcolorspiral(x, y, 255, 276, 322,575, 343)) or
        (findcolorspiral(x, y, 10079232, 358, 307, 449, 332)))
        clickmouse(414, 353, true);wait(500);
        if(findcolorspiral (x, y, 255,17, 359, 54, 496)=false)then begin;
        readstring(user);clickmouse(414, 388, true);wait(500);readstring(pass);wait(500)
        clickmouse(409, 428, true);wait(3000);end
        if findcolorspiral(x, y, 10079232,357, 305, 444, 333) then begin
        clickmouse(380, 315, true);wait(500);pty:=4545 end

        if ((findcolorspiral(x, y, 255,280, 323, 574, 343)=false)and(pty=4545)=false )
        then begin
        wait(500);clickmouse(534, (124*(char)), true);wait(500);
        repeat until((findcolorspiral (x, y, 255,17, 359, 54, 496))OR
        (findcolorspiral(x, y, 255,280, 323, 574, 343))) end
        pty:=0 ;wait(500);
        clickmouse(608, 446, true)
        wait(500)
        if (findcolorspiral(x, y,13158600,465, 455, 469, 459)=false) then begin
        if (not(share=1))then begin
        clickmouse(567, 461, true);wait(200)
        end
        end
        if (findcolorspiral(x, y,13158600,465, 455, 469, 459)) then begin
        if (share=1)then begin
        clickmouse(567, 461, true);wait(200)
        end
        wait(100);clickmouse(80,446,true);wait(100)
        end


        end; //relog procedure end/////////////

        procedure w1(ww:integer); //1=butterflys
        begin //2=nutvipers1
        www:=ww*100 //3=nutvipers2
        repeat
        www:=www-100
        cleardebug
        writeln('Waiting: '+ inttostr(www/100))
        wait(50)
        until www=0
        end;

        procedure check_clock;
        begin
        findwindowtitlepart('date and time properties', false);
        activateclient
        begin
        if(findcolorspiral(x,y,0,257,239,257,239))
        then
        begin
        findwindowtitlepart('date and time properties', false);
        activateclient
        writeln('resetting clock')
        w1(1)
        keyup(17)
        wait(250)
        keyup(17)
        writeln('now clicking *10* on clock')
        clickmouse(261,239,true)
        wait(50)
        clickmouse(261,239,true)
        wait(1500)
        ReadString('10')
        w1(1)
        ReadString('10')
        w1(5)
        clickmouse(356,324,true)
        wait(1500)
        clickmouse(178,201,true)
        wait(1000)
        findwindowtitlepart('endless online',false)
        activateclient
        wait(1000)
        keydown(17)
        wait(150)
        end
        end;
        end;


        //end relog procedure////////////////////////////////////





        var mode:string;
        procedure ScriptStatus2;
        begin
        cleardebug;
        writeln(mode)
        writeln('Hits:'+ inttostr(hitcount)+' - Facing:'+inttostr(facing)+' - Target:'+
        inttostr(TargetDir)+' - Monsters:'+ inttostr(monsters)+' - Antifreeze:'+ inttostr(Ice_cold))
        if(clicker=0)and(findcolorspiral(x,y,255,41,490,41,490))
        then
        begin
        wait(500)
        clickmouse(79,468,true)
        clicker:=1
        end
        if findwindowtitlepart ('endless online', false)then begin activateclient;wait(500)end
        else
        end;

        procedure check_dc;
        begin
        if(FindColorSpiral(x1, y1, 10276608, 30, 55, 619, 328))then
        begin
        wait(500)
        clickmouse(434,235,true)
        changetime
        relog
        keydown(120)
        wait(20)
        keyup(120)
        wait(120)
        end
        end;

        procedure ScriptStatus;
        begin
        cleardebug;
        writeln(mode)
        writeln('Hits:'+ inttostr(hitcount)+' - Facing:'+inttostr(facing)+' - Target:'+
        inttostr(TargetDir)+' - Monsters:'+ inttostr(monsters)+' - Antifreeze:'+ inttostr(Ice_cold)
        +' - Script by Unknown Source')

        check_dc

        if(clicker=0)and(findcolorspiral(x,y,255,41,490,41,490))
        then
        begin
        wait(300)
        end



        begin

        end
        if findwindowtitlepart ('endless online', false)then begin activateclient;wait(500)end
        else
        end;

        Procedure Monstercounter;
        begin
        monsters:=monsters-1
        scriptstatus
        if monsters<1 then begin
        keydown(116)
        wait(10)
        keyup(116)
        keyup(120)
        wait(200)
        keyup(120)
        changetime
        relog
        keydown(120)
        wait(200)
        keyup(120)
        wait(200)
        keyup(120)
        Ice_cold:=Icyhawt
        monsters:=monstercount
        end
        end;

        Procedure NextArrow;
        begin
        hitcount:=hitcount-1
        wait(5)
        if hitcount<0 then begin
        Keyup(17);wait(50);Keyup(17);wait(200);
        sendarrowwait(TargetDir, 200) Facing:=TargetDir
        hitcount:=HitCountReset keydown(17) end
        end;

        Procedure Antifreeze;
        begin
        Ice_cold:=Ice_cold-1
        wait(50)
        scriptstatus
        if Ice_cold<0 then begin
        keydown(116)
        wait(10)
        keyup(116)
        wait(20)
        keyup(120)
        changetime
        relog
        keydown(120)
        wait(20)
        keyup(120)
        wait(20)
        keyup(120)
        monsters:=monstercount
        Ice_cold:=Icyhawt
        monsters:=monsters+1
        end
        end;

        procedure autopot;
        begin

        If findcolorspiral(x, y, 16235924, 163, 27, 165, 33) then begin
        if(pots=1) then begin
        clickmouse(78, 364, true);wait(200)
        clickmouse(460, 370, true)
        wait(8)
        clickmouse(460, 370, true)
        sleep (1)
        end
        end;
        end;






        procedure left;
        begin
        If FindColor(x,y,Monster,288,158,292,162)
        then
        begin
        TargetDir:=3
        If not(Facing=TargetDir) then begin sendarrowwait(TargetDir,100) Facing:=TargetDir end
        keydown(17)
        repeat
        keydown(117)
        nextarrow;
        keydown(117)
        scriptstatus;
        keydown(117)
        antifreeze;
        keydown(117)
        autopot;
        Until (Not(FindColor(x,y,Monster,288,158,292,162)))
        wait(10)
        Keyup(17);
        wait(50);Keyup(17);
        wait(50);keyup(117)
        hitcount:=hitcountreset
        wait(100);
        ice_cold:=icyhawt
        keydown(116)
        wait(10)
        keyup(116)
        monstercounter
        end;
        end;

        procedure right;
        begin
        If (FindColor(x,y,Monster,342,188,348,194))
        then
        begin
        TargetDir:=1
        If not(Facing=TargetDir) then begin sendarrowwait(TargetDir, 100) Facing:=TargetDir end
        keydown(17)
        repeat
        keydown(117)
        nextarrow;
        keydown(117)
        scriptstatus;
        keydown(117)
        antifreeze;
        keydown(117)
        autopot;
        Until (Not(FindColor(x,y,Monster,342,188,348,194)))
        Keyup(17);
        wait(50);
        Keyup(17);
        wait(50)
        keyup(117)
        hitcount:=hitcountreset
        wait(50);
        keydown(116)
        ice_cold:=icyhawt
        monstercounter
        keydown(116)
        keyup(116)
        end
        end;

        procedure up;
        begin
        If FindColor(x,y,Monster,343,158,347,162)
        then
        begin
        TargetDir:=0
        If not(Facing=TargetDir) then begin sendarrowwait(TargetDir, 100) Facing:=TargetDir end
        keydown(17)
        repeat
        keydown(117)
        nextarrow;
        keydown(117)
        scriptstatus;
        keydown(117)
        antifreeze;
        keydown(117)
        autopot;
        Until (Not(FindColor(x,y,Monster,343,158,347,162)))
        Keyup(17);
        wait(50);
        Keyup(17);wait(50);keyup(117)
        hitcount:=hitcountreset
        wait(50);
        keydown(116)
        ice_cold:=icyhawt
        monstercounter
        keydown(116)
        keyup(116)
        end
        end;

        procedure down;
        begin
        If FindColor(x,y,Monster,288,189,292,193)
        then
        begin
        TargetDir:=2
        If not(Facing=TargetDir) then begin sendarrowwait(TargetDir, 100) Facing:=TargetDir end
        keydown(17)
        repeat
        keydown(117)
        nextarrow;
        keydown(117)
        scriptstatus;
        keydown(117)
        antifreeze;
        keydown(117)
        autopot;
        Until (Not(FindColor(x,y,Monster,288,189,292,193)))
        Keyup(17);wait(50);Keyup(17);wait(50);keyup(117) hitcount:=hitcountreset wait(50);
        keydown(116)
        ice_cold:=icyhawt
        monstercounter
        keydown(116)
        keyup(116)
        end
        end;

        procedure Mage;
        begin
        If FindColorSpiral(x,y,Monster,15,65,625,332)then
        begin
        If(mager=1) then begin
        KeyUp(117)
        KeyDown(113)
        Wait(50)
        KeyUp(113)

        Wait(10)
        ClickMouse(x,y,True)
        Wait(1000)

        end
        end;
        end;




        procedure heal1;
        begin
        If findcolorspiral(x, y, 16235924, 200, 26, 200, 33) then begin
        if(heal=1) then begin
        keyup(116)
        wait(10)
        keydown(115)
        wait(10)
        keyup(115)
        wait(700)
        keydown(115)
        wait(10)
        keyup(115)
        wait(10)
        keydown(112)
        wait(50)
        keyup(112)
        wait(400)
        end
        end;
        end;

        procedure checkdc;
        begin
        If findcolorspiral(x, y, 10079232, 433, 212, 435, 228) then begin
        relog
        end;
        end;





        procedure settings; begin end;{v---Down below(settings)}


        begin
        writeln(' If you get this script, Dont give it out. I am the only 1 who gives it out ty ;] ')






        wait(1000)

        findwindowtitlepart('endless online',false)
        activateclient
        {MAKE SURE DATE/TIME PROPERTIES IS OPEN!!!!!}


        {---Hotkeys should be
        {Hotkey #1 should be +1 and set on "1"}
        {Hotkey #2 should be +Whatever and set on "2"}
        {No other hotkey will be used, kthx}
        {----------------------------------------------------------------}
        //Personal settings


        HitCountReset:=7

        Monstercount:=10 //How many monsters to kill before automatically relogging

        Icyhawt:=12 //Anti-freeze, justify how long of a wait it is,
        //and enter how long you would like it to be, etc
        people:=55287;//Yellow stuff that is on people in the eobots client, or w/e

        hpcolor:=16235924; //The blue HP bar stuff

        monster:=1638350; //You know this.

        monsterM:= 1629877;

        //Username/Password input can be found at top
        {---------------------------------------------------------------}
        {What may need editing:
        Check_dc
        Potions
        Heal
        Relog
        Mabye a few other things
        }
        targetdir:=5
        Facing:=5
        Ice_cold:=Icyhawt;
        monsters:=monstercount
        hitcount:=hitcountreset
        scriptstatus


        repeat
        left
        right
        up
        down
        autopot
        mage
        heal1
        checkdc
        scriptstatus
        check_dc

        until(false)
        end.
        //How To Use = By:Someone. =)//
        //Set your hotkey F5 = 1+//
        //Set your hotkey F6 = Anything you want//
        //Med Heal (Known as Survive) = F1, Mage = F2, Self Heal = F3//
        //Open your clock and if it don't say Date and Time Properties//
        //You will have to set it as what it says, to do so, go to Check_Clock in the//
        //script.//

